perm filename TEST.MF[MF,DEK]4 blob
sn#756247 filedate 1984-06-06 generic text, type C, neo UTF8
COMMENT ā VALID 00007 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 tracingall
C00018 00003 primarydef x**y = mexp(y*mlog x) enddef
C00020 00004 stop
C00021 00005 =enddef
C00022 00006 path p
C00023 00007 showvar e
C00024 ENDMK
Cā;
tracingall;
draw (0,0)..controls (13.33717,33.34294) and (26.67436,66.6859)
..(40.01154,100.02884);
showall currentpicture;
end
input bbase[bor,dek];
tracingall;
draw
(142.30528,0)..controls (173.92882,0) and (205.55235,0)
..(237.17587,-0.00002);
stop;showall (3,1){4,1};
draw (0,0)..(9,-.00002);
showall currentpicture;
draw (0,-.00002)..(9,0);
showall currentpicture;
end
def max(text t) = show t enddef;
def p(expr z)=max(xpart z,ypart z) enddef;
p((3,4));
a1=3; b2=c3; showvariable a,b,bb,c; showtoken a,b,bb,c;
def mm(expr p,q,r)=enddef; mm((a,b)(c,d))(e,f);
show pair "1", (0,0){0,0};
addto currentpicture doublepath
(62,71)..controls (61.33333,70.33333) and (62.33333,69.33333)
..(63,70)
withpen pencircle zscaled (.2pt,.01pt) rotated 25;
input font1base
% D by Dan Mills
vardef char.D =
begingroup
% charcd := 'D;
save glyphwidth,lsb,rsb,cuthru,baseline;
numeric glyphwidth,lsb,rsb,cuthrubaseline;
baseline=0;
glyphwidth = .5em;
lsb = .2glyphwidth;
rsb = .1glyphwidth;
cuthru = .02xheight;
setwidth( lsb+glyphwidth+rsb );
% positions:
% 1 is special
pos2(.55[thinwidth,thickwidth],45);
pos3(thickwidth,0);
pos4(.5[thinwidth,thickwidth],-45);
% 5 is special
% coordinates:
% 1 is special
x2 = lsb + .7glyphwidth; y2 = .92capheight;
x3r = lsb + glyphwidth; y3 = .55capheight;
x4 = lsb + .7glyphwidth; y4 = .15capheight;
% 5 is special
% specials:
x1r = lsb; y1r = capheight;
x1l = x1r + .85thickwidth; y1l = y1r - thinwidth;
z1 = .5[z1l,z1r];
x5r = lsb; y5r = baseline;
x5l = x1r + .85thickwidth; y5l = y5r + thinwidth;
z5 = .5[z5l,z5r];
% draw straights:
stroke(1,5,.45,.2,.2);
% add slopes for curves:
dz1 = (1,0);
dz3 = (0,-1);
dz5 = (-1,0);
% draw curves:
curve(1,2,3);
curve(3,4,5);
endgroup;
enddef;
init.bold(1.618033);
proofing:=1;
openwindow 0 from (0,0) to (420,500) at (-40,310);
window:=0;
tracingall;
ppi:=722.909;
fixunits;
e:=nulledges;char.D;shipout e;
delimiters ();
def tracingall=tracingcommands:=3;
tracingedges:=1; tracingtitles:=1; tracingequations:=1; tracingspecs:=1;
tracingpens:=1; tracingchoices:=1; tracingstats:=2;
tracingonline:=1;tracingoutput:=1;tracingmacros:=3 enddef;
tracingall; xyzzy:=1;
vardef a=first enddef;
outer end;
vardef a.b=second end
path p[]; p1=(0,0)..(1,1); p2=(0,0)..(1,1)..cycle;
show point 0 or p;
charlist oct"11",oct"15";
extensible hex"A":1,3,0,3,5;
extensible 2;
fontdimen 3: 2.5, 6.5, 0, 4x;
def BCPLstring(expr s,max)=
for l:=if length(s)>max: max else: length(s) fi: l
for n:=1 step 1 until l: , substring (n-1,n) of s endfor endfor enddef;
def fontfamily expr s=headerbyte 49: BCPLstring(s,19) enddef;
def codingscheme expr s=headerbyte 9: BCPLstring(s,39) enddef;
fontfamily "HECK"; codingscheme "GEEWHILLIKERS";
ligtable 2:13:13=:10, 12 kern 128,10:11: 13 kern x, "ab";
def dp expr d = charcode:=charcode+1; chardp:=d; shipout e enddef;
edges e; e:=nulledges;
dp 5;
dp 15;
dp 27;
dp 13;
dp 9;
dp 0;
dp 21;
dp -2;
dp 17;
dp 11;
dp 3;
charic:=-1000; dp -1;
dp 25;
dp 31;
dp 19;
dp 7;
charwd:=256; chardw:=69;
dp 23;
dp 30;
headerbyte 72: 13;
fontmaking:=1;
end
show point 0 of p1, precontrol 0 of p1, postcontrol 0 of p1;
show point 0 of p2, precontrol 0 of p2, postcontrol 0 of p2;
show point -10 of p2, precontrol -10 of p2, postcontrol -10 of p2;
show point 1 of p1, precontrol 1 of p1, postcontrol 1 of p1;
show point 0.5 of p1, precontrol 0.5 of p1, postcontrol 0.5 of p1;
show point 0.5 of p2, precontrol 0.5 of p2, postcontrol 0.5 of p2;
show point 1.00002 of p1;
errorstopmode; stop;
openwindow 1 from (0,0) to (400,400) at (-30,300);
path p;
p = (0,0)..(20,5)..(30,10)..(28,15)..(10,12)..cycle;
edges e;
e := nulledges;
%addto e doublepath
%(62.02022,177.31749)..controls (89.37149,195.24434) and (117.86916,214.00005)
% ..(150.63965,214)..controls (164.38574,214.00012) and (178.38567,210.85576)
% ..(188.08105,201.16052)..controls (212.05948,177.18196) and (214.0001,141.02405)
% ..(214,107)..controls (213.99977,75.62737) and (207.32466,43.5252)
% ..(185.20044,21.4013)..controls (170.15105,6.35194) and (148.91663,-0.00002)
% ..(127.59912,0)..controls (103.61507,0.00008) and (94.07852,27.55898)
% ..(76.70984,42.94687)
%withpen pencircle;
stop;addto e contour p scaled .2 withweight 3;
addto e contour p rotated 33 scaled .2 withweight -1;
addto e contour p rotated -20 slanted -.5 scaled .2 withweight 2;
stop;addto e contour p rotated 97 scaled .15 withweight 3;
showall e;
showall e rotated 90;
edges ee;
ee := nulledges;
addto ee contour
(39.99939,0)..controls (41.74025,3.25948) and (43.4811,6.51894)
..(45.22195,9.77841)..controls (60.88858,39.11166) and (76.5552,68.44493)
..(92.22182,97.77818)..controls (97.40727,92.59274) and (102.59273,87.40726)
..(107.77818,82.22182)..controls (95.41826,58.02942) and (83.93538,33.39886)
..(73.35197,8.37825)..controls (72.22737,5.71953) and (72.10214,2.7438)
..(72.99939,0)..controls (61.9994,0) and (50.99937,0)
..cycle;
%(92.22182,97.77818)..controls (97.40727,92.59274) and (102.59273,87.40726)
% ..(107.77818,82.22182)
% ..(92.22182,97.77818)
% ..cycle;
addto ee contour (93,95)..(94,96)..cycle;
showall ee;
showall ee rotated 90 xscaled -1;
cull ee by (-1,2);
showall ee;
pausing:=1;
showall (a,b) rotated 90 xscaled -1;
showall ee rotated 90 xscaled -1;
showall pencircle xscaled 30 yscaled 2 rotated 20;
%def a(text t)=enddef; a((b+c)*d);
xyzzy:=1; autorounding:=2; smoothing:=1;
openwindow 5 from (0,0) to (300,400) at (-100,300);
def draw expr p = addto ee doublepath p enddef;
%draw (0,0)..tension 5..
% (20,200)..(80,100)..(80,30) withpen makepen((-10,-5)..(10,5)..cycle);
%display ee on 5; pausing:=1;
%cull ee by (-1,1); ee:=nulledges;
draw (0,0)..tension 5..
(20,200)..(80,100)..(80,30) withpen pencircle scaled 40;
cull ee by (-1,2);
display ee on 5;
%showall ee;cull ee by (-1,2);showall ee;
ee:=nulledges; draw (0,10)..(5,0); showall ee;
end
pen p[]; p1=pencircle; p2=pencircle scaled 1.2; p3=pencircle scaled 2;
def next = showall ee; ee:=nulledges enddef;
stop;draw (0,0)..(3,3); next;
%stop;draw (0.5,0)..(0.5,4) withpen pencircle scaled 2;
draw (0.5,0)..(5.5,5) withpen p1; next;
draw (0.5,5)..(5.5,0) withpen p1; next;
draw (0,0)..(5,10) withpen p1; next;
draw (0.5,0)..(5.5,10) withpen p1; next;
draw (0,10)..(5,0) withpen p1; next;
draw (0.5,10)..(5.5,0) withpen p1; next;
draw (0.5,0)..(5.5,5) withpen p2; next;
draw (0.5,5)..(5.5,0) withpen p2; next;
draw (0,0)..(5,10) withpen p2; next;
draw (0.5,0)..(5.5,10) withpen p2; next;
draw (0,10)..(5,0) withpen p2; next;
draw (0.5,10)..(5.5,0) withpen p2; next;
draw (0.5,0)..(5.5,5) withpen p3; next;
draw (0.5,5)..(5.5,0) withpen p3; next;
draw (0,0)..(5,10) withpen p3; next;
draw (0.5,0)..(5.5,10) withpen p3; next;
draw (0,10)..(5,0) withpen p3; next;
draw (0.5,10)..(5.5,0) withpen p3; next;
end
showall ee;
sqrttwo = sqrt 2;
pair N, S, E, W, NE, SE, SW, NW;
N = -S = (0,1);
E = -W = (1,0);
sqrttwo*NE = N+E; sqrttwo*NW = N+W;
sqrttwo*SE = S+E; sqrttwo*SW = S+W;
path semicirc, fillpath, penpath;
semicirc = E..NE..N..NW..W;
penpath = (21.75,-4)..semicirc scaled 21.75..(-21.75,-4);
penpath := penpath & reverse penpath & cycle;
pausing:=1;
stop;draw penpath shifted (.25,0) withpen pencircle scaled 1.2;
display ee on 5;
pen p[]; p1=pencircle; p2=pencircle scaled 2.9; p3=pencircle scaled 12;
p4=makepen((0,0)..(10,0)..(5,10)..cycle);
edges ee;
ee = nulledges;
path q[]; q1=(10,0)..(0,-10)..(10,50);
tracingall;
stop;addto ee doublepath (0.1,1.1)..(2.1,3.1) withpen p1;
stop;addto ee contour(0,0)..(10,10)..cycle withpen p4;
showall ee;
showall ee xmult -1;
showall (0,0)..(1,1)..cycle;
path a;
a = (0,0);
a := a shifted (1,1);
pair z;
show z rotated 90;
show z rotated 90;
pair pp,qq;
qq = (xpart pp, ypart pp);
openwindow 0 from (0,0) to (380,300) at (0,300);
display ee on 0;
addto ee contour
(30.8154,30.5538)..(24.1231,25.7692)..(15.1231,23.3692)..(07.1692,26.1692)
..(48.1538,32.2000)
&(48.1538,32.2000)..(49.8462,32.1077)
&(49.8462,32.1077)..(47.4923,26.3538)..(41.2000,23.5231)..(35.0615,25.4923)
..(30.8154,30.5538) & cycle
withweight -1;
display ee on 0;
x1=5; x1a=6;
numeric x[]a;
showvar x;
string s[];
s1=s2; s3=s4; s5=s6; s1=s3; show s2; showvar s;
edges e[];
e2=nulledges;
addto e2 contour ((0,0)..(10,20){0,1}..(0,30))..cycle withweight 2;
showall e2;
addto e2 contour (0,0)..(5,5)..cycle withweight -3;
showall e2;
cull e2 by (-3,1);
showall e2;
forever: path p; p=(0,1); (0,1)=p; showall p; endfor; % interrupt this!
end
x+1=y:=y+1=z:=1/2x=z+2;
show (0,0){0,1}..(100,0){100,-1};
show (0,0){0,1}..tension 2 and 3..(100,0){100,-1};
show (0,0){0,1}..bounded..(100,0){100,-1};
show 3[b,c], a[b,b], a[b,c];
a + b/2 + c/3 + d/4 = 3;
a/2 + b/3 + c/4 + d/5 = 1;
a/3 + b/4 + c/5 + d/6 = 4;
a/4 + b/5 + c/6 + d/7 = 1;
show a + b/2 + c/3 + d/4;
show a/2 + b/3 + c/4 + d/5;
show a/3 + b/4 + c/5 + d/6;
show a/4 + b/5 + c/6 + d/7;
0=1; a=a; "abc"="abc"; "abc"="abc ";
forever show "abc"; exitif false; exitiftrue; endfor;
pair right, left, a.zz;
transform t;
right = -left = 2a.zz = (1,0);
show right,left,t;
vardef z@# = (x@#,y@#) enddef;
vardef p[]slope=(#@dx,#@dy) enddef;
p5slope=left;
showvar p;
def penpos(suffix i)(expr l,theta)=
z.i.r-z.i.quote l = (l,0) rotated theta;
z.i = .5[z.i.quote l, z.i.r] enddef;
d=45;
penpos(4,15,d+90);
z1+z2=right;
showdependencies;
z1-z2=left;
path p[];p5=z1..z2;
showall z1,z2,p5;
a1=a2+a3+a4+a5+a6;
a2=a3+a4+a5+a6;
showdependencies;
a3=a4+a5+a6;
a4=a5+a6;
showdependencies;
a5=a6=1/3;
def t=
xx3.1..[[a+-bc_d.e] ]"a string %" <>$1."+-""" % forget this
enddef;
showtoken t;
transform t;
showtoken t;
path p[], x[]arc, f[][];
showvar x;
end
primarydef x**y = mexp(y*mlog x) enddef;
show 1+5**2*2;
vardef round primary x = floor(x+.5) enddef;
u=.21;
show round 15u;
vardef good[] primary x=
begingroup save t;
if odd w@: t=(floor x)+.5;
else: t=round x;
fi; t endgroup enddef;
w3=4.9; x10=15.2; show good3 x10,x10.good;
secondarydef x+++y = sqrt(x*x+y*y) enddef;
show 1+50++50,1+50+++50;
%dump
edges e[];
e[-20]=nulledges;
%addto e[-20] contour ((0,0)..(100,200)..(0,300))..tension 3..cycle;
addto e[-20] contour ((0,0)..(100,200){0,1}..(0,300))..cycle;
%addto e[-20] contour (0,0)..(0,100)..cycle;
%addto e[-20] contour (0,0)..controls (1,0) and (1,2)..
% (0,2)..controls (-1,2) and (-1,0)..cycle;
%addto e[-20] contour (0,0)..controls (49,0) and (49,100)..
% (0,100)..controls (-49,100) and (-49,0)..cycle;
%showall e[-20];
%proofing:=1;
"testing";
shipout e[-20];
openwindow .00011 from (0,0) to (380,400) at (-250,275);
%openwindow .00011 from (0,0) to (380,400) at (-250,325);
%openwindow .00011 from (0,0) to (200,300) at (-50,150);
display e[-20] on .00011;
openwindow .00005 from (200,300) to (250,350) at (-150,275);
display e[-20] on .00005;
stop;
end
stop;
def
=;enddef;
path p;
showtoken tracingall;
showtoken
;showvar e;
showall p,a+b,b+a+begingroup showalldependencies; c endgroup,(0,5){curl 2};
p=(0,0)..(100,200)..(0,300);
showall stop,p..cycle;
end
tracingall;
def testmac(expr a,b)(text c)=show a,b,c; enddef;
testmac(3,4)(year);
show (if true: 0 else: 1 fi)+(if false: 2 elseif true: 3 else: 4 fi)
+(if false: 5 else: 6 fi);
forever show "abc"; exitif false; exitiftrue; endfor;
show stop,normaldeviate,normaldeviate,time,time-.1;
for n=1 step 5 until 13; show n; endfor;
errorstopmode;stop;